﻿using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Text;

namespace PaCSTools.Tool
{
    public class MySQLHelper
    {
        public static IDbConnection Connection = null;
        public MySQLHelper()  
        {
            Connection = new MySqlConnection("server=127.0.0.1;database=pacs;uid=root;pwd=123456;charset='utf8'"); 
        }

        public static IDbConnection CreateInstance()
        {
            if (Connection == null)
            {
                Connection = new MySqlConnection("server=127.0.0.1;database=pacs;uid=root;pwd=123456;charset='utf8'");             
            }
            return Connection;
        }
    }

}
